﻿using MediatR;
using Microsoft.AspNetCore.Http;
using Microsoft.AspNetCore.Mvc;
using Microsoft.EntityFrameworkCore.Metadata.Internal;
using SheepCultivation.API.AddliCation.AddressW;
using SheepCultivation.API.AddliCation.Tip_newspaper;
using SheepCultivation.Common.Domain.main;
using SheepCultivation.Common.Domain.Week2;
using SheepCultivation.Common.Dto;
using SheepCultivation.Common.Infrastructure.Interface;

namespace SheepCultivation.API.Controllers
{
    [Route("api/[controller]/")]
    [ApiController]
    public class PromptController : ControllerBase
    {
        public readonly IMediator mediator;
        
        public PromptController(IMediator mediator)
        {
            this.mediator = mediator;
        }
        /// <summary>
        /// 首次妊检显示
        /// </summary>
        /// <param name="pregnancySeach"></param>
        /// <returns></returns>
        [HttpPost("pregnancyList")]
        public async Task<Result> Handle(PregnancySeachCommon pregnancySeach)
        {
            return await mediator.Send(pregnancySeach);
           
        }
        /// <summary>
        /// 待配提示显示
        /// </summary>
        /// <param name="pendingPrompts"></param>
        /// <returns></returns>
        [HttpPost("pendingPromptsList")]
        public async Task<Result> Handle(PendingPromptsSeachCommon pendingPrompts)
        {
            return await mediator.Send(pendingPrompts);
        }
        /// <summary>
        /// 羊只转舍新增
        /// </summary>
        /// <param name="transfer"></param>
        /// <returns></returns>
        [HttpPost("TransferAdd")]
        public async Task<Result> Handle(TransferCreateCommon transfer)
        {
            return await mediator.Send(transfer);
        }
        /// <summary>
        /// 羔羊断奶新增
        /// </summary>
        /// <param name="LambWeaning"></param>
        /// <returns></returns>
        [HttpPost("LambWeaningAdd")]
        public async Task<Result> Handle(LambWeaningCreateCommon LambWeaning)
        {
            return await mediator.Send(LambWeaning);
        }
        /// <summary>
        /// 羊只转舍显示
        /// </summary>
        /// <param name="transfer"></param>
        /// <returns></returns>
        [HttpPost("transferList")]
        public async Task<Result> Handle(TransferSeachCommon transfer)
        {
            return await mediator.Send(transfer);
        }
        /// <summary>
        /// 羔羊断奶显示
        /// </summary>
        /// <param name="LambWeaning"></param>
        /// <returns></returns>
        [HttpPost("LambWeaningList")]
        public async Task<Result> Handle(LambWeaningSeachCommon LambWeaning)
        {
            return await mediator.Send(LambWeaning);
        }
        /// <summary>
        /// 后裔转种新增
        /// </summary>
        /// <param name="transplanting"></param>
        /// <returns></returns>
        [HttpPost("transplantingAdd")]
        public async Task<Result> Handle(TransplantingCreateCommon transplanting)
        {
            return await mediator.Send(transplanting);
        }
        /// <summary>
        /// 后裔转种显示
        /// </summary>
        /// <param name="Transplanting"></param>
        /// <returns></returns>
        [HttpPost("TransplantingList")]
        public async Task<Result> Handle(TransplantingSeachCommon Transplanting)
        {
            return await mediator.Send(Transplanting);
        }
        /// <summary>
        /// 羊只转舍反填
        /// </summary>
        /// <param name="TransferBack"></param>
        /// <returns></returns>
        [HttpPost("TransferBack")]
        public async Task<Result> Handle(BackfillSeachCommon TransferBack)
        {
            return await mediator.Send(TransferBack);
        }
        /// <summary>
        /// 羔羊断奶反填
        /// </summary>
        /// <param name="LambBack"></param>
        /// <returns></returns>
        [HttpPost("LambBack")]
        public async Task<Result> Handle(LambBackSeachCommon LambBack)
        {
            return await mediator.Send(LambBack);
        }
        /// <summary>
        /// 后裔转种反填
        /// </summary>
        /// <param name="TransplantingBack"></param>
        /// <returns></returns>
        [HttpPost("TransplantingBack")]
        public async Task<Result> Handle(TransplantingBackSeachCommon TransplantingBack)
        {
            return await mediator.Send(TransplantingBack);
        }
    }
}
